Skip to content

Fix: Restore Mirror Timers (Fatigue, Breath, etc.)#126

Open
Neeo1504 wants to merge 8 commits intoDaleHuntGB:mainfrom
Neeo1504:FIX_RestoreMirrorFrames
Open

Fix: Restore Mirror Timers (Fatigue, Breath, etc.)#126
Neeo1504 wants to merge 8 commits intoDaleHuntGB:mainfrom
Neeo1504:FIX_RestoreMirrorFrames

Conversation

@Neeo1504
Copy link
Copy Markdown

Problem

After the addon loaded, the standard mirror timers (fatigue, breath, underwater, etc.) disappeared. The addon was calling PlayerCastingBarFrame:UnregisterAllEvents() and PlayerCastingBarFrame:Hide(), which broke the event system that mirror timers rely on. Even after attempts to manually show the timer frames, they remained invisible because the underlying events were no longer being processed.

Solution

  • Keep the standard cast bar active – instead of unregistering events or hiding the frame, we now make it fully transparent (SetAlpha(0)) and disable mouse interaction, but leave it alive so that mirror timers continue to receive necessary events.
  • Explicitly restore mirror timers – add a new function BCDM:RestoreMirrorFrames() that finds the correct container (MirrorTimerContainer in Midnight) and shows/updates all timer bars.
  • Call the restore function after the UI initialises and after relevant events (player entering world, specialization change) with a small delay to let the UI settle.

Changes

File Function Change
CastBar.lua BCDM:CreateCastBar() Replaced UnregisterAllEvents() and Hide() with SetAlpha(0) and EnableMouse(false).
Globals.lua BCDM:RestoreMirrorFrames() New function to show and update mirror timers.
Core.lua BetterCooldownManager:OnEnable() Added call to RestoreMirrorFrames after initialisation.
EventManager.lua BCDM:SetupEventManager() Added RestoreMirrorFrames after spec change and world load events.

Result

Mirror timers are now restored and work correctly. The custom cast bar remains functional, and the standard Blizzard cast bar is hidden visually without interfering with the event system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant